From 67b170206bbdbe758865c9a68bf057418e65d830 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Tue, 25 Apr 2006 18:55:37 +0000 Subject: [PATCH] Remove possible line-breaks from description. --- gpsbabel/kml.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gpsbabel/kml.c b/gpsbabel/kml.c index 33eba0500..531712ff5 100644 --- a/gpsbabel/kml.c +++ b/gpsbabel/kml.c @@ -143,7 +143,16 @@ void wpt_name(const char *args, const char **unused) void wpt_desc(const char *args, const char **unused) { - if (args) wpt_tmp->description = xstrappend(wpt_tmp->description, args); + if (args) { + char *tmp, *c; + + tmp = xstrdup((char *)args); + c = lrtrim(tmp); + if (*c) { + wpt_tmp->description = xstrappend(wpt_tmp->description, c); + } + xfree(tmp); + } } void wpt_coord(const char *args, const char **attrv) -- 2.30.2